package com.fw.system.web.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 签到表
 * </p>
 *
 * @author ${author}
 * @since 2023-03-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TbSignUser对象", description="签到表")
public class TbSignUser extends Model<TbSignUser> {

    private static final long serialVersionUID = 1L;

    @TableField("id")
    @TableId
    private String id;

    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "签到日期")
    @TableField("sign_time")
    private LocalDate signTime;

    @ApiModelProperty(value = "满X天状态：1已满足 0不满")
    @TableField("sign_ok")
    private Integer signOk;

    @TableField("create_time")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField("create_by")
    private String createBy;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
